package ssm.mapper;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import ssm.pojo.ItemsCustom;
import ssm.pojo.User;

import java.util.List;

import static org.junit.Assert.*;

public class ItemsMapperCustomTest {

    private ApplicationContext applicationContext;

    @Before
    public void setUp() throws Exception {
        applicationContext = new ClassPathXmlApplicationContext("classpath:spring/applicationContext-dao.xml");

    }

    @Test
    public void findItemsList() throws Exception {
        ItemsMapperCustom itemsMapperCustom = applicationContext.getBean(ItemsMapperCustom.class);
        //调用UserDao方法
        List<ItemsCustom> list = itemsMapperCustom.findItemsList(null);

        System.out.println(list.get(0).getName());

    }
}